with xpa.list.single;
with ada.text_io;

procedure test is
	package parent is new xpa.list(integer);
	package xxx is new parent.single;

	--type int_list is new xxx.list with null record;
	subtype int_list is xxx.list;

	--type list_access is access all xxx.list'class;
	--x: list_access;

	--x: xxx.list;
	x: int_list;

	p: xxx.node_access;
	v: integer;
begin
	ada.text_io.put_line ("testing...");

	--int_list.clear (x);
	--x := new xxx.list;

	--xxx.clear (x);
	xxx.append (x, 1000);
	xxx.append (x, 2000);
	xxx.append (x, 3000);
	
	p := xxx.first (x);
	while xxx.is_valid(p) loop
		v := xxx.value(p);
		ada.text_io.put_line (v'img);
		p := xxx.forward(p);
	end loop;

	xxx.clear (x);
end test;
